<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 23649
  Date: 2021/5/7
  Time: 18:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <%
        String paths = request.getContextPath();
        String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + paths + "/";
    %>
    <link rel="icon" type="image/x-icon" href="<%=basePath%>static/img/huaziloge.ico"/>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="<%=basePath%>static/layui-v2.6.5/layui/css/layui.css"
          media="all">
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
    <title>华子医院</title>
    <style type="text/css">
        #logo {
            font-size: 40px;
            font-family: "新宋体";
            color: #009688;
            margin-left: 150px;
        }

        #logo span {
            font-size: 25px;
            color: black;
        }

        .layui-nav-item span {
            font-size: 10px;
        }

        #bingli, #ct {

            background-color: white;
            width: 600px;
            height: 300px;
            position: absolute;
            top: 250px;
            left: 400px;
        }

        #User_bing, #User_ct {

            margin-left: 120px;
        }

        #User_bing td, #User_bing th, #ct td, #ct th {
            border: #9F9F9F solid 0.5px;
        }

        #backgoud-color {
            opacity: 0.5;
            width: 1550px;
            height: 700px;
            background-color: #9F9F9F;
            position: absolute;
            top: 180px;

        }

        #ctInfo {
            margin-left: 50px;
        }
    </style>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="<%=basePath%>static/layui-v2.6.5/layui/css/layui.css"
          media="all">
</head>
<body>
<div id="hread">
    <p id="logo"><img src="<%=basePath%>static/img/loge.gif"
                      STYLE="height: 180PX; width: 180PX;font-family: '方正大黑简体';    ">华子医院
        <span>用户大厅</span></p>
</div>
<ul class="layui-nav">
    <li class="layui-nav-item layui-this"><a href="<%=basePath%>user"><span>首页</span></a></li>
    <li class="layui-nav-item">
        <a href="javascript:void(0);" id="info">医院简介</a>
    </li>
    <li class="layui-nav-item"><a href="javascript:void(0)" id="locations">我们的位置</a></li>
    <li class="layui-nav-item">
        <a href="javascript:void(0);">患者服务</a>
        <dl class="layui-nav-child">
            <dd><a href="javascript:void(0)" id="guahao">预约挂号</a></dd>
            <dd><a href="javascript:void(0)" id="AC">查看病历</a></dd>
            <dd><a href="javascript:void(0)" id="ad">查看检查报告</a></dd>
            <dd><a href="javascript:void(0)" id="userInfo">查看个人信息</a></dd>
            <dd><a href="javascript:void(0)" id="ypjiaofei">药品缴费</a></dd>
            <dd><a href="javascript:void(0)" id="ctjiaofei">检查缴费</a></dd>
        </dl>
    </li>
    <li class="layui-nav-item">
        <a href="javascript:void(0);">设置</a>
        <dl class="layui-nav-child">
            <dd><a href="<%=basePath%>login">退出登录</a></dd>

        </dl>
    </li>
    <li class="layui-nav-item">欢迎登录 <span>${user.name}</span></li>
</ul>
<div id="user-body">
    <iframe src="<%=basePath%>hello" frameborder="0" width="100%" height="600px">
    </iframe>
</div>
<div id="backgoud-color"></div>
<div id="bingli" overflow="auto">
    <input type="image" src="<%=basePath%>static/img/close.jpg" id="close">
    <table class="layui-table">
        <thead>
        <tr>
            <th lay-data="{field:'id', width:80}">看诊编号</th>
            <th lay-data="{field:'username', width:80}">患者姓名</th>
            <th lay-data="{field:'sign', width:'50%', event: 'setSign', style:'cursor: pointer;'}">患者病历</th>
            <th lay-data="{field:'experience'}">看诊医生</th>
            <th lay-data="{field:'score'}">看诊日期</th>
        </tr>
        </thead>
        <c:forEach items="${list}" var="list">
            <tr id="UserInfos">
                <td>${list.id}</td>
                <td>${list.userName}</td>
                <td>${list.userType}</td>
                <td>${list.doctorName}</td>
                <td>${list.time}</td>
            </tr>
        </c:forEach>
    </table>
</div>
<div id="ct" overflow="auto">
    <input type="image" src="<%=basePath%>static/img/close.jpg" id="ct-close">
    <table class="layui-table">
        <thead>
        <tr>
            <th lay-data="{field:'id', width:80}">患者姓名</th>
            <th lay-data="{field:'username', width:80}">检查部位</th>
            <th lay-data="{field:'sign', width:'50%', event: 'setSign', style:'cursor: pointer;'}">病况</th>
            <th lay-data="{field:'experience'}">确诊医生</th>
            <th lay-data="{field:'score'}">检查时间</th>
        </tr>
        <c:forEach items="${ct}" var="ct">
            <tr id="ctInfo">
                <td>${ct.userName}</td>
                <td>${ct.part}</td>
                <td>${ct.dignose}</td>
                <td>${ct.doctorName}</td>
                <td>${ct.time}</td>
            </tr>
        </c:forEach>
        </thead>
    </table>
</div>

<script src="<%=basePath%>static/layui-v2.6.5/layui/layui.js" charset="utf-8"></script>
<script src="<%=basePath%>static/jquery/jquery-1.12.4.js"></script>
<script type="text/javascript">
    $(function () {
        $("#ct").hide();
        $("#backgoud-color").hide();
        $("#bingli").hide();
        $("#info").click(function () {
            $("iframe").attr("src", "<%=basePath%>intro");
        })
        $("#locations").click(function () {
            $("iframe").attr("src", "<%=basePath%>hospital");
        })
        $("#guahao").click(function () {
            $("iframe").attr("src", "<%=basePath%>sub");
        })
        $("#userInfo").click(function () {
            $("iframe").attr("src", "<%=basePath%>userInfo");
            $("iframe").attr("src", "<%=basePath%>userInfo");
        })
        $("#AC").click(function () {
            $("#backgoud-color").show();
            $("#bingli").show();
        })
        $("#close").click(function () {
            $("#backgoud-color").hide();
            $("#bingli").hide();
        })
        $("#ad").click(function () {
            $("#backgoud-color").show();
            $("#ct").show();
        })
        $("#ct-close").click(function () {
            $("#backgoud-color").hide();
            $("#ct").hide();
        })
        $("#ypjiaofei").click(function () {
            $("iframe").attr("src", "<%=basePath%>bill?userName=${user.name}");
        })
        $("#ctjiaofei").click(function () {
            $("iframe").attr("src", "<%=basePath%>UserServlet?name=${user.name}");
        })
    })
</script>
</body>
</html>
